﻿@model Dinamico.Models.PartProductGoogleModel
@{
    string id = Convert.ToString(Model.ID);
    string priceTbxId = "Price_" + id;
    string quantityId = "Quantity_" + id;
    var defaultQuantity = "1";
    var singleArticleObj = "singleArticleObj_" + id;
       
}
<span id="priceOld">@Model.OldPrice</span>
<span id="priceTop">@Model.PriceTop<span id="priceFloor">@Model.PriceFloor</span></span>
<span class="calculation">
<span class="price">___________________</span>
<span class="price" id="@priceTbxId"></span>
</span>

                    <input type="text" name="Quantity" class="quantity_input" value="@defaultQuantity"
                        style="width: 40px;" maxlength="6" onkeypress="return @(singleArticleObj).NumbersOnly(event);"
                        onkeyup="@(singleArticleObj).QuantityChange();" onblur="@(singleArticleObj).QuantityChange();"
                        id="@quantityId" />

<input type="submit" onclick="@(singleArticleObj).AddToBasket(this);return false;"
        value="do koszyka" id="addToBasketBig" />
                            <!-- GENERATE THIS INPUT LIST -->
                    <script type="text/javascript">     
       var @(singleArticleObj) = new SimpleArticle();
       @(singleArticleObj).Init( "@priceTbxId", "@quantityId",@Model.CurrentPrice ,"@id");

</script>

